package com.liugenshui.mybatisdemo.controller;

import com.liugenshui.mybatisdemo.dao.UserMapper;
import com.liugenshui.mybatisdemo.entity.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description:
 * @Author: icourt-liugenshui
 * @Date: Create in 2018/10/16 下午12:06
 */
@RestController
@RequestMapping("/api/v1/user")
public class UserController {

    @Resource
    private UserMapper userMapper;

    @GetMapping
    public List<User> getAllUsers(){
        return userMapper.getAll();
    }
}
